package com.qlslylq.ad.sdk.enums;

/**
 * 广告事件标识<br/>
 */
public enum AdEventSign {

    APP_OPEN("打开APP", "daily_open_app"),

    AD_REQUEST("广告请求", "AD_REQUEST"),
    AD_RETURN_SUCCESS("广告返回成功", "AD_RETURN_SUCCESS"),
    AD_RETURN_FAIL("广告返回失败", "AD_RETURN_FAIL"),
    AD_EXPOSURE("广告曝光", "AD_EXPOSURE"),
    AD_CLICK("广告点击", "AD_CLICK"),
    AD_CLOSE("广告关闭", "AD_CLOSE");

    private String id;

    private String name;

    AdEventSign(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static AdEventSign getEnumByName(String name) {
        for (AdEventSign item : AdEventSign.values()) {
            if (item.getName().equals(name)) {
                return item;
            }
        }
        return null;
    }
}
